#!/usr/bin/env python
# -*- coding: utf-8 -*-

# @Time     :2022/03/29
# @Author   :Changshu
# @File     :Exercise_31.py

# 31. 下一个排列


if __name__ == '__main__':
	a=[1,2,3,8,5,7,6,4]
	print(a)
	b=a[3:6]
	b.sort()
	a[3:6]=b
	# a[3:].sort()
	print(a)